<?php
namespace app\common\model;
use x\Xbase;
class Userxiangmu extends Xbase
{
  //验证项目权限
  public function check($user_id, $xiangmu_id){
    $sql = "select end_time,status from user_xiangmu where user_id=? and xiangmu_id=?";
    $rs = $this->db->query($sql, [$user_id, $xiangmu_id], 1);
    if($rs && $rs['status']==0 && $rs['end_time']>time()){
      return $rs['end_time'];
    }
    return false;
  }
}
